/* eslint-disable */
// 该文件由 OneAPI 自动生成，请勿手动修改！
import { request } from '@umijs/max';

const CREATE_STUDENT = '/yoocaApi/student/createStudent'
const UPDATE_STUDENT = '/yoocaApi/student/updateStudent'
const QUERY_STUDENT = '/yoocaApi/student/queryStudent'
const QUERY_STUDENT_BY_CARD_ID = '/yoocaApi/student/queryStudentByCardId'

export async function createStudent(
  body?: StudentAPI.CreateStudentParam,
) {
  return request<CommonAPI.Result<null>>(CREATE_STUDENT, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function updateStudent(
  body?: StudentAPI.UpdateStudentParam,
) {
  return request<CommonAPI.Result<null>>(UPDATE_STUDENT, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function queryStudent(
  body?: StudentAPI.QueryStudentParam,
) {
  return request<CommonAPI.Result<StudentAPI.QueryStudentResp>>(QUERY_STUDENT, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}


export async function queryStudentByCardId(
  body?: StudentAPI.QueryStudentByCardIdParam,
) {
  return request<CommonAPI.Result<StudentAPI.Student>>(QUERY_STUDENT_BY_CARD_ID, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: body,
  });
}
